//shouquan.js
//获取应用实例
const app = getApp()
/**
 * 版权：山西书海传媒科技有限责任公司
 * 作者：吕俊雄
 * 更新时间：2019年3月29号
 */
Page({
  onLoad: function (options) {
    var that = this;
    that.data.res = options.phone;
    that.data.bmid_ = options.bmid;
    that.data.userid_ = options.userid;
    that.data.xh_ = options.xh;
    that.data.jtid_ = options.jtid;
    wx.request({
      url: 'https://wxapp.shuhai.cc/hh/goIndex.action',
      method: 'post',
      header: {
        'content-type': 'application/x-www-form-urlencoded'
      },
      data: {
        phone: that.data.res,
        bmid: that.data.bmid_,
        userid: that.data.userid_,
        xh: that.data.xh_,
        jtid: that.data.jtid_ 
      },
      success: function (res) {
        if (res.data.status == "success") {
          var result = res.data.data.result;
          console.log(res.data.data.result);
          that.setData({
            sh_index: result
          })
        } else {
          console.log("无");
        }
      }, fail: function (res) {
        wx.hideLoading();
        wx.showToast({
          title: '网络错误！',
          icon: 'none',
          duration: 2000
        })
        return;
      }
    });
  }
})
